As relation database is developed, a large amount of data can be stored in database in a manner of relation form. How to employ these data efficiently has become a subsequent development trend in the data management field. In commercial intelligent application, corporation needs to process and analyze existing data to help the corporation make advisable decisions for operation and working. Basic query supported on relation database can't answer some complex questions in decision-making, and the organization of data is with respect to storage in lower layer but not application in upper layer. For example, basic table of database only defines one about “customer” and “contract,” and also defines some rules on these basic tables, such as “what customer belongs to high value customer” or “what contract belongs to unhealthy contract.” Then, when corporation wants to query “high value customer” or “unhealthy contract” according to data in database system, one can't query such unintuitive concepts in relation database and has to use reasoning system to solve such problem properly since there is no item of “high value customer” or “unhealthy contract” in basic table of database. The base of reasoning system is first order logic (also referred to symbolic logic). Relation database may be extended flexibly and more complex query can be supported by incorporating logic operation into relation database.
In reasoning system, user defines new predicate by rule on relation database. Object that can exist independently (subject, accusative, etc. in clause) is referred to object word or individual word, and predicate is referred to a word used to characterizing object or relationship between objects. Basic table in the above can be referred to basic predicate, and rule defined on basic table (basic predicate) can be referred to rule predicate. It is desirable to solve logic relation in rules by means of a system with reasoning capability since a query of predicate defined by rule can't invoke the query language in database.
Currently, there are two methods for reasoning in the art, runtime reasoning and materialization-based reasoning. The runtime reasoning means that reasoning is performed in runtime query. The materialization-based reasoning means that all reasoning results are calculated beforehand and stored in relation table. They have different advantages and disadvantages. Specifically, the advantage of the former is that the reasoning result isn't needed to be calculated beforehand and it doesn't be affected by data update, but the disadvantage is that it takes a long time to answer the query since the query result can only be returned through reasoning after a query request is received. The advantage of the latter is that it doesn't need to calculate reasoning result during runtime data query, and the query result can be obtained by using directly pre-calculated reasoning result, and the return time of result of runtime query can thus be saved. However, its disadvantage is faced with data update, that is, when data is updated, the reasoning results calculated beforehand have to be calculated again.